<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="signupForm">
						<div>
							<input name="id" id="id" th:field="*{ticket.id}" type="hidden" >
							<div class="form-group">
								<div class="container">
									<label class="col-sm-2 control-label">停车券名称：</label>
									<div class="col-sm-9">
										<input name="ticketName" id="ticketName" th:field="*{ticket.ticketName}"   class="form-control" type="text" placeholder="请输入停车券名称">
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="container">
									<label class="col-sm-2 control-label">抵用时长（分钟）：</label>
									<div class="col-sm-9">
										<input id="minute" name="minute" class="form-control" th:field="*{ticket.minute}" type="text" placeholder="单位分钟">
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="container">
									<label class="col-sm-2 control-label">价格（元）：</label>
									<div class="col-sm-9">
										<input id="price" name="price" class="form-control" th:field="*{ticket.price}" type="text" placeholder="单位元">
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="container" >
									<button  type="button"  onclick="addGift()" class="btn btn-primary" style="margin-left:15px">添加优惠</button>
									<button  type="button"  onclick="clearAll()" class="btn btn-danger">全部清除</button>
								</div>
							</div>
							<div class="form-group" style="margin-left:0px;padding-right:20px">
								<div class="container">
									<input id="buyNums" name="buyNums" type="hidden" value="">
									<input id="giftNums" name="giftNums" type="hidden" value="">
									<input id="giftCnt" name="giftNums" type="hidden" th:value="${giftCnt}">
									<table class="table table-striped" style="margin-top:-10px;display:none"  >
										<thead>
										<tr>
											<th>购满（张）</th>
											<th>送（张）</th>
											<th style="text-align:right">操作</th>
										</tr>
										</thead>
										<tbody id="t_body">
											<tr th:each="gift,stat:${giftList}" class='giftclass'>
												<td th:text="${gift.ticketBuyNum}"></td>
												<td th:text="${gift.ticketGiftNum}"></td>
												<td style="text-align:right">
													<a class='btn btn-warning' href='javascript:;'  onclick='delOne(this)' title='删除'><i class='fa fa-remove'></i></a>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<div class="form-group">
								<div class="container">
									<div style="float:right;padding-right:15px">
										<button type="submit" class="btn btn-primary">提交</button>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/ticket/edit.js">
	</script>
</body>
</html>
